<?php
/*
# ------------------------------------------------------------------------
# JA Job Board Package
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/

  defined('_JEXEC') or die('Retricted Access');
  $items = $this->items;
  global $jbconfig;
  $pagination = $this->pagination;
?>
<div class="moduletable job-box">	

<div id="jobboard-content">
<form name="adminForm" action="<?php echo JURI::root();?>index.php" method="POST">

	<table class="tablelist translist" >
	<thead>
		<tr>
			<td class="first sectiontableheader" width="15%">            		
    			<?php echo JHTML::_('grid.sort',   JText::_('Receipt ID'), 'a.id',$this->filter_order['order_dir'], $this->filter_order['order']); ?>
    		</td>
			<td class="sectiontableheader">            		
    			<?php echo JHTML::_('grid.sort',   JText::_('Product'), 'product_name',$this->filter_order['order_dir'], $this->filter_order['order']); ?>
    		</td> 
    		<td class="sectiontableheader"  width="10%">            		
    			<?php echo JHTML::_('grid.sort',   JText::_('Amount')."(".$jbconfig['currency']->get('currency').")", 'a.amount',$this->filter_order['order_dir'], $this->filter_order['order']); ?>
    		</td> 
    		<td class="sectiontableheader" width="7%">
    			<?php echo JHTML::_('grid.sort',   JText::_('Payment method'), 'a.payment_method',$this->filter_order['order_dir'], $this->filter_order['order']); ?>
    		</td>
			<td class="sectiontableheader" width="7%">            		
    			<?php echo JHTML::_('grid.sort',   JText::_('Status'), 'a.completed',$this->filter_order['order_dir'], $this->filter_order['order']); ?>
    		</td> 
			<td class="sectiontableheader"  width="15%">            		
    			<?php echo JHTML::_('grid.sort',   JText::_('Created date'), 'a.created_date',$this->filter_order['order_dir'], $this->filter_order['order']); ?>
    		</td> 	
    		<td class="last sectiontableheader" width="15%">            		
    			<?php echo JText::_('Action'); ?>
    		</td> 	
    	</tr>	
    </thead>
	<tfoot>
	<tr>
		<td colspan="6">
			<?php echo $pagination->getListFooter(); ?>
		</td>
	</tr>
	</tfoot>    
   
    <?php
        for($i = 0, $n = count($items); $i < $n; $i++)
        {
        	$item = $items[$i];
        	$checked 	= JHTML::_('grid.id',   $i, $item->id );
       ?>
       		<tr class="sectiontableentry<?php echo ($i%2)+1; ?> <?php if($i==0) echo 'first'; elseif($i+1==$n) echo 'last';?>">
       			<td width="15%">
       				<a href="<?php echo JRoute::_("index.php?option=$option&view=jaemployers&layout=trans_detail&cid[]=$item->id&Itemid=".JRequest::getVar('Itemid','1000'));?>">
       					<?php echo $item->txn_id?$item->txn_id:JText::_("NA"); ?>
       				</a>       			
       			</td>
       			<td>
       				<?php echo $item->product_name ; ?>
       			</td>
       			<td width="10%">
       				<?php echo $item->amount ; ?>
       			</td>
       			<td width="8%">
       				<?php echo JText::_($item->payment_name);?>
       			</td>
       			<td width="7%">
       				<?php echo JText::_($item->status_name);?>
       			</td>
       			<td width="15%">
       				<?php echo generateDate($item->created_date);?>
       			</td>
       			<td width="15%">
       				<a href="<?php echo JRoute::_("index.php?option=$option&view=jaemployers&layout=invoices_detail&userid={$item->user_id}&cid[]=$item->id&Itemid=".JRequest::getVar('Itemid','1000'));?>">
       					<?php echo JText::_('View invoice')?>
       				</a>       				
       			</td>       			
       		</tr>
       	<?php
        }
        ?>    
    			
	</table>			
		       	
			
<input type="hidden" name="task" value="" />			
<input type="hidden" name="filter_order" value="<?php echo $this->filter_order['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->filter_order['order_dir']; ?>" />
<input type="hidden" name="option" value="<?php echo $option; ?>" />
<input type="hidden" name="view" value="jaemployers" />
<input type="hidden" name="layout" value="transactions" />
<input type="hidden" name="Itemid" value="<?php echo JRequest::getVar('Itemid'); ?>" />
</form>
</div>
</div>